home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / dev / src / chunkyiclass.lha / chunkyiclass.doc < prev    next >
Encoding:
Text File  |  1995-04-10  |  2.3 KB  |  75 lines

  1. Class:            penshareiclass
  2. Superclass:       imageclass
  3. Include File:     "penshareiclass.h"
  4.  
  5. This class can, if properly used, give colorfull images on any public screen.
  6. It also supports bitmap scaling. If used with V39 or higher of AmigaOS it can
  7. take advantage of pen sharing.
  8.  
  9. New Methods:
  10.  
  11. None.
  12.  
  13.  
  14. Changed Methods:
  15.  
  16. IM_DRAW - Tells the object to draw itself. Supports IDS_NORMAL and
  17. IDS_SELECTED drawing states and doesn't use a DrawInfo structure.
  18.  
  19. IM_DRAWFRAME - Tells the object to draw a scaled version of itself. Uses the
  20. graphics.library function BitMapScale () to scale the image.
  21.  
  22. IM_HITFRAME - Asks the object if a point would be inside it if the object
  23. was confined (scaled) to the given rectangular bounds. Returns TRUE if the
  24. given point would be inside the object, otherwise FALSE.
  25.  
  26. IM_ERASEFRAME - Tells the object to erase itself using the rectangular bounds
  27. given.
  28.  
  29.  
  30. Attributes:
  31.  
  32. *IA_Left, IA_Top (ISG) - Same as for imageclass. Defaults to 0.
  33.  
  34. *IA_Width, IA_Height (ISG) - Same as for imageclass. Defaults to the width and
  35. height of IA_Data.
  36.  
  37. IA_BGPen (ISG) - Background pen of normal image. Defaults to BACKGROUNDPEN of
  38. CHUNKYIA_Screen.
  39.  
  40. CHUNKYIA_SelectedBGPen (ISG) - Backgroundpen of selected image. Defaults to
  41. FILLPEN of CHUNKYIA_Screen.
  42.  
  43. IA_Data (ISG) - Array of UBYTEs describing the image. The array must have the
  44. following form:
  45.  
  46.    UBYTE   image_data[] = {
  47.       highbits_width, lowbits_width, highbits_height, lowbits_height,
  48.       color_of_pixel1, color_of_pixel2, ...
  49.    };
  50.  
  51. CHUNKYIA_SelectedData (ISG) - Description of the selected image (optional).
  52.  
  53. IA_Pens (ISG) - Use this to tell the object which pens the values in the
  54. data array represents (optional).
  55.  
  56. CHUNKYIA_Palette (I) - (Ignored on systems prior to V39) An array of ULONGs
  57. describing the palette for the picture. If you take care of obtaining pens
  58. yourself, you should only pass the IA_Pens attribute on creation.
  59. The format of the array should be the following:
  60.  
  61.    ULONG palette[] = {
  62.       num_triplets, red1, green1, blue1, red2, green2, blue2, ...
  63.    };
  64.  
  65. CHUNKYIA_Screen (IG) - Screen to use image on. This attribute must be
  66. provided when creating an object of this class.
  67.  
  68.  
  69. Additional functions in library:
  70.  
  71. Class *init_chunkyiclass (void) - Initializes the class and returns a pointer
  72. to it.
  73.  
  74. BOOL free_chunkyiclass (Class *cl) - Frees the class.
  75.